import store from 'store2';

const { session, page } =  store

// localStorage
export const setStore = (key, data) => store.set(key, data);

export const getStore = (key) => store.get(key);

export const removeStore = (key) => store.remove(key);

export const clearAllStore = () => store.clearAll()

// sessionStorage
export const setSession = (key, data) => session.set(key, data);

export const getSession = (key) => session.get(key);

export const removeSession = (key) => session.remove(key);

export const clearAllSession = () => session.clearAll();

// page 页面刷新数据消失
export const setPage = (key, data) => page.set(key, data);

export const getPage = (key) => page.get(key);

export const removePage = (key) => page.remove(key);

export const clearAllPage = () => page.clearAll();
